<div data-role="content">
    <?php echo $msg ?>
    <p class="event-process-location">
        <span class="event-supplier-loc">Event Details </span>|
        <span class="event-supplier-loc current"> Event Supplier </span>|
        <span class="event-supplier-loc"> Event Checklist </span>|
        <span class="event-supplier-loc"> Event Task(s) </span>
    </p>
    <div class="btn-wrapper-left">
        <a href="#new-supplier-popup" data-role="button" data-icon="plus" data-rel="popup" data-inline="true" data-transition="slideup" id="btn-new-supplier">New Supplier</a>
    </div>
    <ul data-role="listview" data-icon="false" data-filter="true" data-filter-placeholder="Filter supplier name...">
        <?php if($supplier==FALSE){
            echo '<li>Their currently no supplier/s available.</li>';
        }else{
            foreach($supplier as $item) { ?>
                <li><a href="#view-supplier-popup" data-rel="popup" data-transition="slideup" class="view-supplier-popup">
                        <h2><?php echo $item['company']?></h2>
                        <p><?php echo $item['contact_person']?></p>
                        <div class="ui-li-aside">
                            <a href="#" data-role="button" data-inline="true" data-icon="grid" data-iconpos="notext" class="ui-btn-active assigned-services">Assign Service(s)</a>
                            <a href="#" data-role="button" data-inline="true" data-icon="bars" data-iconpos="notext" class="services-offered">Edit Service(s)</a>
                        </div>
                    </a></li>
        <?php   }
        }?>
    </ul>
    <div class="btn-next-container">
        <a href="#info-msg" data-role="button" data-rel="popup" data-transition="slideup" data-inline="true" class="btn-next">Next</a> 
    </div>
    <div data-role="popup" id="info-msg" data-overlay-theme="c" data-dismissible="true" data-position-to="window" class="popup-form">
        <div data-role="header">
            <p class="p-reformat">Confirmation Message</p>
        </div>
        <div data-role="content">
            <p>You cannot go back to this page after you click <b>"Next"</b> but you can edit it after you finish creating the event.</p>
            <div class="btn-wrapper-right">
                <a href="<?php echo site_url();?>event/event-checklist" data-transition="slide" data-role="button" data-inline="true" class="next ui-btn-active">Yes</a> 
                <a href="#" data-rel="back" data-role="button" data-inline="true">No</a> 
            </div>
        </div>
    </div>
    <div data-role="popup" id="new-supplier-popup" data-overlay-theme="c" data-dismissible="false" data-position-to="window" class="popup-form">
        <div data-role="header">
            <h3>Supplier</h3>
        </div>
        <div data-role="content">
            <form action="<?php echo site_url()?>contact/supplier/add" method="post" id="new-supplier-form" data-ajax="false">
                <input type="hidden" name="location" value="event-supplier" />
                <fieldset data-role="fieldcontain">
                    <label for="supplier-cname">Company Name</label>
                    <input type="text" name="cname" id="supplier-cname" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-service">Service</label>
                    <input type="text" name="service" id="supplier-service" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-contact-person">Contact Person</label>
                    <input type="text" name="contact_person" id="supplier-contact-person" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-contact-no">Contact No.</label>
                    <input type="text" name="contact_no" title="Please put a valid contact number(11 digits from 0-9)." id="supplier-contact-no" required pattern="[0-9]{11}" />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-address">Address</label>
                    <input type="text" name="address" id="supplier-address" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-email">Email Address</label>
                    <input type="email" name="email" id="supplier-email" required />
                </fieldset>
                <div class="btn-wrapper-right">
                    <input type="submit" id="supplier-submit" value="Save" data-inline="true" />
                    <a href="#" data-rel="back" class="btn-cancel" data-role="button" data-ajax="false" data-inline="true">Cancel</a>
                </div>
            </form>
        </div>
    </div>
    <div data-role="popup" id="view-supplier-popup" data-overlay-theme="c" data-dismissible="false" data-position-to="window" class="popup-form">
        <div data-role="header">
            <h3>Supplier</h3>
        </div>
        <div data-role="content">
            <form action="<?php echo site_url()?>contact/supplier/add" method="post" id="new-supplier-form" data-ajax="false">
                <input type="hidden" name="location" value="event-supplier" />
                <fieldset data-role="fieldcontain">
                    <label for="supplier-cname">Company Name</label>
                    <input type="text" name="cname" id="supplier-cname" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-service">Service</label>
                    <input type="text" name="service" id="supplier-service" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-contact-person">Contact Person</label>
                    <input type="text" name="contact_person" id="supplier-contact-person" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-contact-no">Contact No.</label>
                    <input type="text" name="contact_no" title="Please put a valid contact number(11 digits from 0-9)." id="supplier-contact-no" required pattern="[0-9]{11}" />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-address">Address</label>
                    <input type="text" name="address" id="supplier-address" required />
                </fieldset>
                <fieldset data-role="fieldcontain">
                    <label for="supplier-email">Email Address</label>
                    <input type="email" name="email" id="supplier-email" required />
                </fieldset>
                <div class="btn-wrapper-right">
                    <input type="submit" id="supplier-submit" value="Update " data-inline="true" />
                    <a href="#" data-rel="back" class="btn-cancel" data-role="button" data-ajax="false" data-inline="true">Cancel</a>
                </div>
            </form>
        </div>
    </div>
</div>